package com.itjeffrey.autocode.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.itjeffrey.autocode.bo.ScheduleJobBO;
import com.itjeffrey.autocode.common.Result;
import com.itjeffrey.autocode.entity.ScheduleJobTbEntity;

/**
 * 服务接口
 * @author: admin
 * @date: 2021-04-17 01:03:13
 */
public interface ScheduleJobTbService extends IService<ScheduleJobTbEntity> {

    Result add(ScheduleJobBO scheduleJobBO);

    Result mod(ScheduleJobBO scheduleJobBO);

    Result deleteById(Integer id);

    Result queryById(Integer id);

    Result queryList(ScheduleJobBO scheduleJobBO);

    Result pauseJob(String id);

    Result resumeJob(String id);

    /**
     * 更新任务状态
     * @param jobId 任务ID
     * @param newSts 新任务状态
     */
    void updateStatus(String jobId, String newSts);

    Result getJobId();

    Result queryByBeanName(String beanName);

}